/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.menosehmais.framework.taglibs;

import java.io.IOException;
import java.io.StringWriter;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.SimpleTagSupport;

/**
 *
 * @author Junior JAFJ
 */
public class MehMTagPortlets extends SimpleTagSupport {
 //   public List<PortletDTO> listPortlet;
    private String listPortlet;

    public void setListPortlet(String listPortlet) {
        this.listPortlet = listPortlet;
    }
    public String getListPortlet() {
        return this.listPortlet;
    }

    @Override
    public void doTag() throws JspException, IOException {
//        JspWriter out = getJspContext().getOut();
//        StringWriter stringWriter = new StringWriter();
//        int i = 1;
//        System.out.println(listPortlet);
//        getJspBody().invoke(stringWriter);
//        System.out.println(stringWriter.getBuffer());

        // Param was setting
//        if (listPortlet != null) {
//            for (PortletDTO p : listPortlet) {
//                out.println("<li id='port_1_" + i + "' class='portlets'>");
//                out.println("<img src='" + p.getUrl() + "'/><br>");
//                out.println("</li>");
//                i++;
//            }
//        }
    }

//    public void setListPortlet(List<PortletDTO> listPortlet) {
//        this.listPortlet = listPortlet;
//    }
    
}
